home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 97 / CD-ROM 97 / CD-ROM 97.iso / jogos / spherical / Code / Library / window.h < prev   
Encoding:
C/C++ Source or Header  |  2002-08-11  |  2.1 KB  |  46 lines

  1.  
  2. // Copyright (C) 2002 by Luigi Pino.  All Rights Reserved.
  3.  
  4. /***************************************************************************/
  5.  
  6. class Window_Class {
  7.     public:
  8.         Window_Class(int texture_size);                                        // Constructor
  9.         ~Window_Class();                                                                    // Deconstructor
  10.  
  11.         bool        CreateGLWindow(char *title, int width, int height, int bits, bool fullscreenflag);
  12.         void        Font_Begin();
  13.         void        Font_End();
  14.         float        Font_Char(char *word, float x, float y, float size, float r, float g, float b);
  15.         float        Font_Float(double number, int precision, float x, float y, float size, float r, float g, float b);
  16.         float        Font_Int(int number, float x, float y, float size, float r, float g, float b);
  17.         float        Font_Time(bool show_hours, bool show_minutes, bool show_seconds, bool show_micro_seconds,
  18.                                             float total_seconds, float x, float y, float size, float r, float g, float b);
  19.         float2    Font_Position(int letter);
  20.         float        Font_Print_Texture(char *word, float x, float y, float size, float r, float g, float b);
  21.         GLuint    Get_Texture(int index);
  22.         void        Initialize_GL();
  23.         void        KillGLWindow();
  24.         void        Load_Texture(int index, char *name);
  25.         void        Process_Messages();
  26.  
  27.         bool        keys[256];                                                                // Keyboard array
  28.         bool        active;                                                                        // Whether program is active
  29.         bool        quit_game;                                                                // Quit program flag
  30.         float        zFar;                                                                            // Z buffer far boundary
  31.         float        zNear;                                                                        // Z buffer near boudary
  32.         HDC            hDC;                                                                            // Private GDI device context
  33.         int            polygon_number;                                                        // Amount of polygon in frame
  34.         int            screen_height;                                                        // Screen resolution height
  35.         int            screen_width;                                                            // Screen resolution width
  36.         MSG            msg;                                                                            // Message structure
  37.  
  38.     private:
  39.         bool                        fullscreen;                                                // Fullscreen flag
  40.         GLuint                    *texture;                                                    // Texture pointer
  41.         HGLRC                        hRC;                                                            // Permanent rendering context
  42.         HWND                        hWnd;                                                            // Window handle
  43.         HINSTANCE                hInstance;                                                // Instance of program
  44. };
  45.  
  46. /***************************************************************************/